//
//  Reports.h
//  A One POS
//
//  Created by AonePOS on 24/09/13.
//  Copyright (c) 2013 AonePOS. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "InvoiceCell.h"
#import "ReportsEmployeeCell.h"

@interface Reports : UIViewController<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate,UIWebViewDelegate>

{
  
    UIView *sidemenu,*mainview,*backgroundcolorview;
    UIButton *categorybutton;
    UIToolbar *downtoolBar,*maintoolBar;
    UIImageView *logobackview,*logoimageview;
    int y,p;
    _Bool isLandScope;
    UIButton *helpiconButton,*logouticonButton,*menubutton;
    BOOL menuslected;
    UIButton *backButton3,*backButton2,*backButton;
    UINavigationBar *navBar;
    UILabel *Reporttypelbl,*Searchlbl;
    UIButton *ReporttypeBtn;
    UIDatePicker *datePicker,*datePicker2,*datePicker3,*datePicker4;
    UIView *subview1;
    UIButton *btn1;
    UIView *ReportTypeView;
    UITableView *ReportTypeTable;
    NSMutableArray *ReportTypesArray;
    
    UITextField *fromTFDown, * toTFDown;
    
     UILabel *sationLbl,*Timelbl,*EmpIdlbl;
    UIButton *logoBtn;
    
     NSMutableArray * loginID, * loginEmp, * loginEmpID, * empLoginTime, *empLogoutTime, * diffMin,*diffHours,*wages,*sessionId,*uniqueId,*createdTimeStamp,*modifiedTimeStamp,*serverLocal;
    
    NSMutableArray * departmentId,* departmentDis,*categoryId,* deptUniqueId, *deptCreatedTimeStmp, *deptModifiedTimeStamp, *deptserverLocal, *deptFoodStmp, *deptTotalTax, * deptCheckValue;
    
    NSMutableArray * invoiceitem,* invoiceDis, *invoiceTotalTax,*invItemName, *invItemDisp, *invPriceChange, *invAvgCost, * invinItemQut, *invID, *invUniqueID, *invCreatedTs, *invPaymentType, *invInDept, * invVendor, *invStoreId, *invStatus;
    UILabel * fromLabel, * toLabel, * departLabel,* paymentLabel;
    
     UIButton * departmentButton, * paymentButton, * goButton, * saveButton;
    
    
     UITextField *fromTFUp, * toTFUp;
    
    UIView * whiteView;
     UIView * blueView;
    
     UITextField * searchField;
    
     NSArray * departmentArray;
     NSMutableArray * paymentArray;
     UITableView * departmentTV, * paymentTV;
    
     UIDatePicker * fromDate;
    UIDatePicker * toDate;
    
     UILabel * itemIdLabel, *itemNamelabel, * discountLabel, * taxLabel, * yourCostLabel, *AvgCostLabel, * QuantityLabel, * dateLabel;
    
    UIDatePicker *fromTimePick,*toTimePick ;
    
    
    
   NSMutableArray * vendorsDataArray;
    
    UITableView * displayTableView,* SearchlistTable;
    
  NSMutableArray * itemIDArray, * itemNameArray, * discountArray, * taxArray, * yourCostArray, * avgArray, * quantityArray, * dateArray, *reportsTotalDataArray,*pastDataArray, *SearchDataArray  ;
    
     UIButton * printerButton;
    
     UIView * departmentPopUp,* paymentPopUp;
     NSMutableArray * departmentNamesArray;
    
    
    //Divya Coding Values Assiging
    
     UIButton *orderStatusBtn, *empIdBtn, *customerIdBtn;
    
     UILabel * empIdlabel, * customerIdLabel, * orderStatusLbl;
    
    
    NSMutableArray * orderArray, * empIdArray, *customerArray;
    
     UIView * orderView, *empIdView, *customerView;
    UITableView * orderTableView, *empIDTableView, *customerTableView;
        
    UITableView * invoiceTableView, * departmentWiseTableView;
    
     NSMutableArray * paymentTypeArray, *totalTaxArray, *avgCostArray, * flashReportsArray;
     NSString *paymentStr;
    NSMutableString * flashReportAlertStr;
    NSMutableArray *TimesArray;
    
    
    NSMutableString *PaymentAlertStr;
    //NSMutableString *stringToPrint;
    NSString *CashTotalstr;
      NSString *ChqueTotalstr;
      NSString *cardTotalstr;
    //UIWebView *webView1;
     CGRect PrintHeightrect;
    
    //printer
    BOOL blocking ;
    
    NSMutableArray *printcharArray,*FontsArray,*AlignsArray,*languagesArray,*WidthsArray,*HeightsArray,*boldsArray,*UnderlinesArray,*XpossArray,*unitsArray,*spacingsArray,*printernamesArray,*IpAddsArray,*DBPrintertypesArray,*PrinterIpsArray;
    
    NSString *PayPrinterName,*printChar,*font,*align,*language,*Pwidth,*Pheight,*Bold,*Underline,*xposition,*spacing,*Ipadd,*unit,*Dbprintertype;
    
    //Fplash report View
    UIView *FlashpopupView,*FlashReportView;
    UIWebView *FlashReportWebView;
    UIButton *PrintFlashBtn,*CancelFlashBtn;
    NSMutableArray *ReportDepartmentsArray,*ReportsItemsArray;
    
    IBOutlet InvoiceCell *invoiceCell;
    IBOutlet ReportsEmployeeCell *reportsEmployeeCell;
    
    NSString *SearchPrinterStr;
    NSMutableArray *searchPrinterArray;
    int  result1;
    NSMutableString *flashPrintString;
    
    
}

-(void)releaseViews;

-(UIImage *) imageFromWebView:(UIWebView *)view;

@end
